from nextpy_org import styles
from nextpy_org.templates import template
import nextpy as xt

@template(route="Text", title="4Components", description="1")
def text() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/typography/text.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Heading", title="4Components", description="1")
def heading() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/typography/heading.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Highlight", title="4Components", description="1")
def highlight() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/typography/highlight.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Span", title="4Components", description="1")
def span() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/typography/span.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Markdown", title="4Components", description="1")
def markdown() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/typography/markdown.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)
